<?php

include('classes/class.tinytemplater.php');

$tiny = new TinyTemplater();

$tiny->assignVariable('project_name', 'TinyTemplater');
$tiny->assignVariable('custom_array', array('boolean'=>true, 'string'=>'yes', 'number'=>9, 'nested_array'=>array('is_nested'=>'This is definitely nested')));

$content = <<<EOF
<pre>
This is a block of content,
intended to showcase [project_name]'s
functionality.

[if [custom_array.string] == 'yes']
The string exists!
[else]
The string doesn't exist :-(
[end if]

Is this variable nested? [custom_array.nested_array.is_nested]

[if [custom_array.boolean] == false]
This shouldn't happen.
[else if [custom_array.boolean] == true]
This *should* happen.
[else]
Something went wrong :-(
[end if]

</pre>
EOF;


$tiny->parseString($content);
$tiny->render();


?>